package com.hankol.newretail.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import com.hankol.newretail.fragment.MyEvaluationFragment
import com.hankol.newretail.fragment.MyOrderFragment

/**
 * @author: 关忆北、
 * @date: 2022/8/8
 * @Des：
 */
class MyEvaluationTabVp(fm: FragmentManager) : FragmentPagerAdapter(fm) {
    private val fragmentList: ArrayList<MyEvaluationFragment> = arrayListOf()
    fun setDatas(fragmentList: ArrayList<MyEvaluationFragment>) {
        this.fragmentList.clear()
        this.fragmentList.addAll(fragmentList)
        notifyDataSetChanged()
    }

    override fun getCount(): Int {
        return fragmentList.size
    }

    override fun getItem(position: Int): Fragment {
        return fragmentList[position]
    }

}